<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>layout 微信菜单设置 - Layui</title>
<link rel="stylesheet" href="/layui-v2.0.1/layui/css/layui.css">
<link rel="stylesheet" href="/css/admin.css">

</head>
<body>

<div class="layui-layout layui-layout-admin">
       @include('admin.header')
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
       @include('admin.leftadmin')
    </div>
  </div>
  
  <div class="layui-body">
    <table class="layui-table" lay-data="{ height:500, url:'getdata', page:true, id:'test',limit:10}">
     <thead>
      <tr>
        <th lay-data="{field:'id', width:180, sort: true, fixed: true}">ID</th>
        <th lay-data="{field:'name', width:180}">微信名</th>
        <th lay-data="{field:'type', width:180}">类型</th>
        <th lay-data="{field:'account', width:300}">原始ID</th>
        <th lay-data="{field:'appid', width:300}">AppID</th>
        <th lay-data="{fixed: 'right', width:560, align:'center', toolbar: '#barDemo'}">操作</th>
      </tr>
     </thead>
     <script type="text/html" id="barDemo">
      <a href="setinfo" class="layui-table-link">编辑</a>
      <a href="setbutton" class="layui-table-link">菜单</a>
     </script>
    </table>

  </div>
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © layui.com - 底部固定区域
  </div>
</div>
<script src="/layui-v2.0.1/layui/layui.js"></script>
<script>
  layui.use(['element','form'], function(){
    var element = layui.element;
    var form = layui.form
  
});

  layui.use(['table','jquery'],function(){
  var table = layui.table;
  var $ = layui.jquery;
  table.on('tool(test)', function(obj){ //注：tool是工具条事件名，test是table原始容器的属性 lay-filter="对应的值"
  var data = obj.data; //获得当前行数据
  var layEvent = obj.event; //获得 lay-event 对应的值
  var tr = obj.tr; //获得当前行 tr 的DOM对象
  var id=data['id'];



});

});



</script>